#include <iostream>
#include <vector>


int main() {
    std::vector<int> vec = {1, 2, 3, 4, 5};
    std::cout << "C++11:" << std::endl;
    for (auto v : vec) {
        std::cout << v << "\n";
    }
    std::cout << "C++20:" << std::endl;
    for (auto i = 0; auto v : vec) {
        std::cout << i << ":" << v << "\n";
        i++;
    }

    for (auto iter = vec.begin(); iter != vec.end();) {
        std::cout << *iter << std::endl;
        if (*iter == 1) {
            vec.erase(iter);
        } else {
            ++iter;
        }
    }

    for (auto i = 0; auto v : vec) {
        std::cout << i << ":" << v << "\n";
        i++;
    }

    std::cout << "true ^ true: " << (true ^ true) << "\n";
    std::cout << "false ^ true: " << (false ^ true) << "\n";
    return 0;
}
